/*
 * Copyright (c) 2024 iSOFT INFRASTRUCTURE SOFTWARE CO., LTD.
 * easyAda is licensed under Mulan PubL v2.
 * You can use this software according to the terms and conditions of the Mulan PubL v2.
 * You may obtain a copy of Mulan PubL v2 at:
 *          http://license.coscl.org.cn/MulanPubL-2.0
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 * See the Mulan PubL v2 for more details.
 */

#ifndef __UART_PL011_H__
#define __UART_PL011_H__

#include <plat/device.h>
#include <stdlib/stdint.h>
#include <tools/macros.h>

struct uart_regs_t {
    uint32_t DR;            // 0x000 Data Register
    uint32_t RSR;           // 0x004 Receive Status Register
    uint32_t reserve[4];    // 0x008 ~ 0x014
    uint32_t FR;            // 0x018 Flag Register
    uint32_t reserve1;      // 0x01C
    uint32_t ILPR;          // 0x020 IrDA Low-power Counter Register
    uint32_t IBRD;          // 0x024 Integer Baud Rate Register
    uint32_t FBRD;          // 0x028 Fractional Baud Rate Register
    uint32_t LCR_H;         // 0x02C Line Control Register
    uint32_t CR;            // 0x030 Control Register
    uint32_t IFLS;          // 0x034 Interrupt FIFO Level Select Register
    uint32_t IMSC;          // 0x038 Interrupt Mask Set/Clear Register
    uint32_t RIS;           // 0x03C Raw Interrupt Status Register
    uint32_t MIS;           // 0x040 Masked Interrupt Status Register
    uint32_t ICR;           // 0x044 Interrupt Clear Register
    uint32_t DMACR;         // 0x048 DMA Control Register
};

#endif 
